home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_shw_theboss.cog < prev    next >
Text File  |  1999-11-15  |  4KB  |  151 lines

  1. # Jones 3D Cog Script
  2. #
  3. # shw_TheBoss.cog
  4. #
  5. # The Boss Cog, heh
  6. #
  7. # [CMG] [MDR]
  8. #
  9. #    #####  Notes  #####
  10. #   Cinematic control for Ice Boss.  Relies on SHW_ICEBOSS.COG for actual AI control.
  11. #   This COG will not receive messages directly from the Ice Boss, but will get a final KILLED
  12. #   message from SHW_IceBoss.cog when the boss has received final justice... heheh...
  13. #
  14. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  15. # ========================================================================================
  16.  
  17. symbols
  18.  
  19.         message killed
  20.         message startup
  21.         message entered
  22.         
  23. # ************************** LINKED ITEMS **********************
  24.         cog        IceBossCog                    # ref to boss AI cog
  25.         
  26.         thing    bossghost0                    # boss starting pos
  27.  
  28.         thing   IceBoss                        # ref to real boss, created by boss AI cog
  29.         thing   IceDoor
  30.         thing   Blastpos1
  31.         thing   Blastpos2
  32.         thing   icecampos
  33.         thing   camera
  34.  
  35.         sector    triggersect0                # boss startup cutscene trigger sector
  36.  
  37. # ************************** TEMPLATES *************************
  38.         template    wfallbot
  39.         template    exp=+explode0        local
  40.         
  41.         keyframe    scream=ib_die.key    local
  42.         
  43.         sound   monsterdeath = nub_bull_move3_c.wav    
  44.         sound   explosion = nub_bull_move1_c.wav    local
  45.  
  46. # ************************** MISC LOCAL VARS *******************
  47.         vector    plus5                    local
  48.         vector    camtemp0                local
  49.         vector    camtemp1                local
  50.  
  51.         thing    curCam                    local
  52.         thing    camPos                    local
  53.         thing    explosion1                local
  54.         thing    dust                    local
  55.         thing    player                    local
  56.         
  57.         
  58. end
  59.  
  60. # ========================================================================================
  61. code
  62.  
  63. # ...................................................................
  64. startup:
  65.  
  66.     plus5 = VectorSet(0.0, 0.0, 0.5);
  67.     player = GetLocalPlayerThing();
  68.     IceBoss = -1;
  69.  
  70.     return;
  71.  
  72.  
  73. # ...................................................................
  74. entered:
  75.  
  76.     If ( (GetSenderRef() == triggersect0) && (IceBoss < 0) )
  77.     {
  78.         PRINT("Trigger boss startup");
  79.  
  80.         # Send USER0 message == Tell Boss AI Cog to create the boss at pos of bossghost0
  81.         IceBoss = SendMessageEx(IceBossCog, 27, bossghost0, 0, 0, 0);
  82.  
  83.         # play mega Ice Boss cutscene
  84.  
  85.         # Send USER1 message == Tell Boss AI Cog to put boss "into play"
  86.         SendMessageEx(IceBossCog, 28, 0, 0, 0, 0);
  87.     }
  88.  
  89.     return;
  90.  
  91.  
  92. # ...................................................................
  93. killed:
  94.  
  95.     If ( GetSenderRef() == IceBossCog )
  96.     {
  97.         PRINT("shw_TheBoss.cog got KILLED msg from IceBossCog");
  98.         curCam = GetCurrentCamera();
  99.         
  100.         CopyOrientAndPos(player, camera);
  101.         
  102.         SetCameraFocus(2, camera);
  103.         SetCamerasecondaryFocus(2, IceBoss);
  104.         SetCameraInterpSpeed(2,1.5);
  105.         SetCameraLookInterp(2,1);
  106.         SetCameraPosInterp(2,1);
  107.         SetCurrentCamera(2);
  108.         
  109.         camtemp0 = GetThingPos(camera);
  110.         camtemp0 = VectorAdd(camtemp0, plus5);
  111.         SetThingPos(camera, camtemp0);
  112.         SetCameraFOV(100, 0, 1.0);
  113.         #camPos = VectorSet(0.0, 0.0, 0.50);
  114.         #SetExtCamOffset(camPos);
  115.         #newpos = GetThingPos(curCam);
  116.         #Sleep(1);
  117.         
  118.         #SetCameraFOV(70, 0, 2.0);
  119.         #SetCamerasecondaryFocus(2, IceBoss);
  120.         Sleep(1);
  121.  
  122.         print("playing anims");
  123. #        PlaySoundLocal(monsterdeath, 5, 1, 0x0, 0);
  124. #        PlayKey(IceBoss, scream, 4, 0x02, 0);
  125.         ThingFadeAnim(IceBoss, 1, 0, 4, 0);
  126.         sleep(5.0);
  127.         print("Blowing the ice door");
  128.         SetCamerasecondaryFocus(2, IceDoor);
  129.         SetCameraFocus(2, icecampos);
  130.         SetCurrentCamera(2);
  131.         SetCameraFOV(70, 0, 2.0);
  132.         Sleep(2.0);
  133.         DestroyThing(IceDoor);
  134.         explosion1=CreateThing(exp, Blastpos1);
  135.         dust=CreateThing(wfallbot, Blastpos2);
  136.         dust=CreateThing(wfallbot, Blastpos2);
  137.         dust=CreateThing(wfallbot, Blastpos2);
  138.         Sleep(2.0);
  139.         RestoreExtCam();
  140.         SetCurrentCamera(curCam);
  141.     }
  142.  
  143.     return;
  144.         
  145.  
  146.          
  147. # ========================================================================================
  148. end
  149.  
  150.         
  151.